package com.example.comment.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author QingZeyu
 * @date 2024/5/7 10:42
 */
@ApiModel(value = "评论点赞表")
@Data
@TableName("comment_like")
public class CommentLike {
    /** 主键id */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(name = "主键id")
    private Long id;
    /** 用户id */
    @ApiModelProperty(name = "用户id")
    private Long userId;
    /** 评论id */
    @ApiModelProperty(name = "评论id")
    private Long commentId;
    @ApiModelProperty(name = "关联id")
    private Long referenceId;
    /** 创建人 */
    @ApiModelProperty(name = "创建人")
    private Long createdBy;
    /** 创建时间 */
    @ApiModelProperty(name = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;
    /** 更新人 */
    @ApiModelProperty(name = "更新人")
    private Long updatedBy;
    /** 更新时间 */
    @ApiModelProperty(name = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;
    /** 删除标记 */
    @ApiModelProperty(name = "删除标记")
    private Boolean delFlag;
}
